<template>
  <div>
    <div class="title">周末去哪儿</div>
    <ul>
      <router-link class="item border-bottom" v-for="item in list" :key="item.id" to="">
        <img class="item-img" :src="item.imgUrl" alt="">
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
        </div>
      </router-link>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'WeekendHeader',
  props: {
    list: Array
  },
  data () {
    return {

    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<!--lang="stylus"表示用stylus编写css样式-->
<!--min-width:0 解决了弹性盒子不能实现...省略号的问题-->
<style lang="stylus" scoped>
  @import '~styles/varibles.styl'
  .title
    line-height: .8rem
    background: #eee
    text-indent: .2rem
  .item
    overflow: hidden
    height: 0
    padding-bottom: 37.09%
    .item-img
      width: 100%
    .item-info
      padding: .1rem
      .item-title
        line-height: .54rem
        font-size: .32rem
        ellipsis()
      .item-desc
        line-height: .4rem
        color: #ccc
        ellipsis()
</style>
